const proxyObj = {
	louZeXi: 'http://192.168.20.145:18003',
	louZeXi1: 'http://192.168.20.145:18001',
	louZeXi2: 'http://192.168.7.215:9090',

	fangqanhong: 'http://192.168.15.55:18003',
	fangqanhong2: 'http://192.168.15.55:9090',
	fangqanhong1: 'http://192.168.7.217:9091',

	yangjiahao: 'http://10.168.1.91:9090',
	yangjiahao1: 'http://192.168.7.111:18003',

	test: 'http://192.168.16.9:30697', //泵业测试环境
	zxm: 'http://192.168.20.121:18003'
};
const minioDress = 'http://192.168.15.35:9000';
// const minioDress = 'http://192.168.16.9:31618';

const currentProxy = proxyObj['test'];
// const currentProxy = proxyObj['fangqanhong2'];

export default function (): any {
	return {
		open: true,
		cors: true, // 允许跨域
		host: '0.0.0.0',
		proxy: {
			'/base/': {
				target: `${currentProxy}/g6mirgicbox-base/v1/`,
				// target: `${currentProxy}/v1/`,
				changeOrigin: true,
				rewrite: (path: any): void => path.replace(/^\/base/, '')
			},
			'/system/': {
				target: `${currentProxy}/g6mirgicbox-system/v1/`,
				// target: `${currentProxy}/v1/`,
				changeOrigin: true,
				rewrite: (path: any) => path.replace(/^\/system/, '')
			},
			'/base1/': {
				target: `${currentProxy}/v1/`,
				// target: 'http://192.168.20.145:9090/g6mirgicbox-base/v1/',
				changeOrigin: true,
				rewrite: (path: any) => path.replace(/^\/base1/, '')
			},
			'/minio': {
				target: 'http://192.168.1.122:19000/',
				changeOrigin: true,
				rewrite: (path: any) => path.replace(/^\/minio/, '')
			}
			// ,'/base/': {no
			// 	target: `${currentProxy}/v1/`,
			// 	changeOrigin: true,
			// 	rewrite: (path: any) => path.replace(/^\/base/, '')
			// }
		}
	};
}
